package com.flyxiaozhu.erp.core.libs;

import lombok.Data;

@Data
public class AppException extends Exception {
    int code = 0;

    public AppException(int code) {
        this(code, "");
    }

    public AppException(int code, String message) {
        super(message);
        this.code = code;
    }

    public AppException(JSONResult result) {
        this(result.getCode(), result.getMessage());
    }
}
